From: Florian Müllner Date: Fri, 20 Dec 2019 19:54:07 +0000 (+0100) Subject: st: Fix generated GLSL dependency X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~285 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=15d74c9cd4f6a3792032b1b1e83f838b588b35ef;p=gnome-shell.git st: Fix generated GLSL dependency StScrollViewFade depends on st-scroll-view-fade-generated.c, but that dependency isn't expressed to the build system; we just hope that the custom target runs before compiling the effect. Instead, add the generated source to the st target so the dependency is expressed properly. (The change from .c to .h is to prevent the file from being both included and compiled, resulting in a duplicated symbol) https://bugzilla.gnome.org/show_bug.cgi?id=789937 --- diff --git a/src/st/meson.build b/src/st/meson.build index 7ab203659..452c30b99 100644 --- a/src/st/meson.build +++ b/src/st/meson.build @@ -155,14 +155,15 @@ st_gir_sources = st_sources + st_headers + st_enums data_to_c = find_program(meson.source_root() + '/src/data-to-c.pl') -custom_target('scroll-view-fade-glsl', +glsl_sources = custom_target('scroll-view-fade-glsl', input: ['st-scroll-view-fade.glsl'], - output: ['st-scroll-view-fade-generated.c'], - build_by_default: true, + output: ['st-scroll-view-fade-generated.h'], capture: true, command: [data_to_c, '@INPUT@', 'st_scroll_view_fade_glsl'] ) +st_nogir_sources = [glsl_sources] + st_cflags = [ '-I@0@/src'.format(meson.source_root()), '-I@0@'.format(meson.build_root()), @@ -177,7 +178,7 @@ st_cflags = [ # Currently meson requires a shared library for building girs libst = shared_library('st-1.0', - sources: st_gir_sources + croco_sources, + sources: st_gir_sources + st_nogir_sources + croco_sources, c_args: st_cflags, dependencies: [clutter_dep, gtk_dep, mutter_dep, libxml_dep, m_dep], build_rpath: mutter_typelibdir, diff --git a/src/st/st-scroll-view-fade.c b/src/st/st-scroll-view-fade.c index 8d473d3ad..656fa322f 100644 --- a/src/st/st-scroll-view-fade.c +++ b/src/st/st-scroll-view-fade.c @@ -32,7 +32,7 @@ #define DEFAULT_FADE_OFFSET 68.0f -#include "st-scroll-view-fade-generated.c" +#include "st-scroll-view-fade-generated.h" struct _StScrollViewFade {